Skip to content

feat(db/postgreSQL): Use user-named schema instead of public#58367

Draft
joshtrichards wants to merge 2 commits intomasterfrom
jtr/feat-db-pgsql-schema-drop-public
Draft

feat(db/postgreSQL): Use user-named schema instead of public#58367
joshtrichards wants to merge 2 commits intomasterfrom
jtr/feat-db-pgsql-schema-drop-public

Conversation

@joshtrichards
Copy link
Member

@joshtrichards joshtrichards commented Feb 16, 2026

  • Resolves: #

Summary

We've long assumed usage of the public schema in PostgreSQL, but this is a more of a legacy approach these days. Since pgsql 15 it's no longer the default behavior. Rather than using workarounds to toggle on and use the older approach, we can migrate to the modern approach.

This is a backwards-compatible fix because it only affects the installation code path, which never runs again after initial setup. Existing installations continue working unchanged in public, while new installations benefit from better schema isolation and avoid the PostgreSQL 15+ permission issue entirely.

Separate follow-ups:

  • Update database configuration docs (i.e. drop public / add what's needed if/when relying on manual user creation)
  • Add instructions to help existing installations confirm which approach they have (e.g. SELECT schemaname FROM pg_tables WHERE tablename LIKE 'oc_%' LIMIT 1;)
  • Possibly add instructions on switching

TODO

  • Tests

Checklist

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant